<!DOCTYPE html>




<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>
            
    
        RFC 7486 - HTTP Origin-Bound Authentication (HOBA)
    

        </title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <style>
            @media only screen
            and (min-width: 992px)
            and (max-width: 1199px) {
                body { font-size: 14pt; }
                div.content { width: 96ex; margin: 0 auto; }
            }
            @media only screen
            and (min-width: 768px)
            and (max-width: 991px) {
                body { font-size: 14pt; }
                div.content { width: 96ex; margin: 0 auto; }
            }
            @media only screen
            and (min-width: 480px)
            and (max-width: 767px) {
                body { font-size: 11pt; }
                div.content { width: 96ex; margin: 0 auto; }
            }
            @media only screen
            and (max-width: 479px) {
                body { font-size: 8pt; }
                div.content { width: 96ex; margin: 0 auto; }
            }
            @media only screen
            and (min-width : 375px)
            and (max-width : 667px) {
                body { font-size: 9.5pt; }
                div.content { width: 96ex; margin: 0; }
            }
            @media only screen
            and (min-width: 1200px) {
                body { font-size: 10pt; margin: 0 4em; }
                div.content { width: 96ex; margin: 0; }
            }
            h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
                font-weight: bold;
                /* line-height: 0pt; */
                display: inline;
                white-space: pre;
                font-family: monospace;
                font-size: 1em;
                font-weight: bold;
            }
            pre {
                font-size: 1em;
                margin-top: 0px;
                margin-bottom: 0px;
            }
            .pre {
                white-space: pre;
                font-family: monospace;
            }
            .header{
                font-weight: bold;
            }
            .newpage {
                page-break-before: always;
            }
            .invisible {
                text-decoration: none;
                color: white;
            }
            @media print {
                body {
                    margin-top: 5em;
                    font-family: monospace;
                    font-size: 10.5pt;
                }
                h1, h2, h3, h4, h5, h6 {
                    font-size: 1em;
                }

                a:link, a:visited {
                    color: inherit;
                    text-decoration: none;
                }
                .noprint {
                    display: none;
                }
            }
            @media screen {
                .grey, .grey a:link, .grey a:visited {
                    color: #777;
                }
                .meta-info {
                    background-color: #EEE;
                    width: 96ex;
                }
                .top {
                    border-top: 7px solid #EEE;
                }
                .pad {
                    padding-top: 7px;
                    line-height: 24px;
                    padding-bottom: 4px;
                }
                .bgwhite  { background-color: white; }
                .bgred    { background-color: #F44; }
                .bggrey   { background-color: #666; }
                .bgbrown  { background-color: #840; }
                .bgorange { background-color: #FA0; }
                .bgyellow { background-color: #EE0; }
                .bgmagenta{ background-color: #F4F; }
                .bgblue   { background-color: #66F; }
                .bgcyan   { background-color: #4DD; }
                .bggreen  { background-color: #4F4; }

                .legend   { font-size: 90%; }
                .cplate   { font-size: 70%; border: solid grey 1px; }
            }

            
    .bgwhite  { background-color: white; }
    .bgred    { background-color: #F44; }
    .bggrey   { background-color: #666; }
    .bgbrown  { background-color: #840; }
    .bgorange { background-color: #FA0; }
    .bgyellow { background-color: #EE0; }
    .bgmagenta{ background-color: #F4F; }
    .bgblue   { background-color: #66F; }
    .bgcyan   { background-color: #4DD; }
    .bggreen  { background-color: #4F4; }
    .draftcontent { margin-top:1em;}

        </style>
        
    <link rel="alternate"
          type="application/atom+xml"
          title="Document changes"
          href="/feed/document-changes/draft-ietf-httpauth-hoba/">
    <meta name="description"
          
              content="HTTP Origin-Bound Authentication (HOBA) (RFC 7486)"
          >

        
            <link rel="shortcut icon"
                  href="https://www.ietf.org/lib/dt/8.2.0/ietf/images/ietf-icon-blue3.png">
        
        <link rel="apple-touch-icon"
              href="https://www.ietf.org/lib/dt/8.2.0/ietf/images/apple-touch-icon.png">
    </head>
    <body >
        <div class="content" id="content">
            
<!-- [html-validate-disable-block no-inline-style, attr-quotes, void-style -- FIXME: it's everywhere in this old code] -->
    
    <div class="rfcmarkup">
        <div class="noprint" style="height: .5em;">
            <div onmouseover="this.style.cursor='pointer';"
                 onclick="showLegend();"
                 onmouseout="hideLegend()"
                 style="height: .5em; min-height: .5em; width: 96ex; "
                 class="meta-info bgyellow"
                 title="Click for color legend.">
            </div>
            <div id="legend"
                 class="meta-info noprint pre legend"
                 style="position:absolute; top: 4px; left: 4ex; visibility:hidden; background-color: white; padding: 4px 9px 5px 7px; border: solid #345 1px; "
                 onmouseover="showLegend();"
                 onmouseout="hideLegend();">
            </div>
        </div>
        
            <div class="noprint">
                <pre class="pre meta-info">[<a href="https://datatracker.ietf.org" title="Document search and retrieval page">Search</a>] [<a href="https://www.rfc-editor.org/rfc/rfc7486.txt" title="Plaintext version of this document">txt</a>|<a href="https://www.rfc-editor.org/rfc/rfc7486.html" title="HTML version of this document, from XML2RFC">html</a>|<a href="https://www.rfc-editor.org/rfc/pdfrfc/rfc7486.txt.pdf" title="PDF version of this document">pdf</a>|<a href="/doc/rfc7486/bibtex/" title="BibTex entry for this document">bibtex</a>] [<a href="/doc/rfc7486/" title="Datatracker information for this document">Tracker</a>] [<a href="/group/httpauth/" title="The working group handling this document">WG</a>] [<a href="mailto:draft-ietf-httpauth-hoba@ietf.org?subject=draft-ietf-httpauth-hoba" title="Send email to the document authors">Email</a>] [<a href="https://www.ietf.org/rfcdiff?difftype=--hwdiff&amp;url2=draft-ietf-httpauth-hoba-10.txt" title="Inline diff (wdiff)">Diff1</a>] [<a href="https://www.ietf.org/rfcdiff?url2=draft-ietf-httpauth-hoba-10.txt" title="Side-by-side diff">Diff2</a>] [<a href="https://www.ietf.org/tools/idnits?url=https://www.ietf.org/archive/id/draft-ietf-httpauth-hoba-10.txt" title="Run an idnits check of this document">Nits</a>]
From: <a href="/doc/html/draft-ietf-httpauth-hoba-10">draft-ietf-httpauth-hoba-10</a>                           Experimental</pre>
            </div>
        
        <div class="draftcontent"><pre>Internet Engineering Task Force (IETF)                        S. Farrell
Request for Comments: 7486                        Trinity College Dublin
Category: Experimental                                        P. Hoffman
ISSN: 2070-1721                                           VPN Consortium
                                                               M. Thomas
                                                               Phresheez
                                                              March 2015


                <span class="h1">HTTP Origin-Bound Authentication (HOBA)</span>

Abstract

   HTTP Origin-Bound Authentication (HOBA) is a digital-signature-based
   design for an HTTP authentication method.  The design can also be
   used in JavaScript-based authentication embedded in HTML.  HOBA is an
   alternative to HTTP authentication schemes that require passwords and
   therefore avoids all problems related to passwords, such as leakage
   of server-side password databases.

Status of This Memo

   This document is not an Internet Standards Track specification; it is
   published for examination, experimental implementation, and
   evaluation.

   This document defines an Experimental Protocol for the Internet
   community.  This document is a product of the Internet Engineering
   Task Force (IETF).  It represents the consensus of the IETF
   community.  It has received public review and has been approved for
   publication by the Internet Engineering Steering Group (IESG).  Not
   all documents approved by the IESG are a candidate for any level of
   Internet Standard; see <a href="/doc/html/rfc5741#section-2">Section&nbsp;2 of RFC 5741</a>.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   <a href="https://www.rfc-editor.org/info/rfc7486">http://www.rfc-editor.org/info/rfc7486</a>.














<span class="grey">Farrell, et al.               Experimental                      [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


Copyright Notice

   Copyright (c) 2015 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to <a href="/doc/html/bcp78">BCP 78</a> and the IETF Trust&#x27;s Legal
   Provisions Relating to IETF Documents
   (<a href="https://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   <a href="#section-1">1</a>.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   <a href="#page-3">3</a>
     <a href="#section-1.1">1.1</a>.  Interfacing to Applications (Cookies) . . . . . . . . . .   <a href="#page-4">4</a>
     <a href="#section-1.2">1.2</a>.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   <a href="#page-5">5</a>
     <a href="#section-1.3">1.3</a>.  Step-by-Step Overview of HOBA-http  . . . . . . . . . . .   <a href="#page-6">6</a>
   <a href="#section-2">2</a>.  The HOBA Authentication Scheme  . . . . . . . . . . . . . . .   <a href="#page-6">6</a>
   <a href="#section-3">3</a>.  Introduction to the HOBA-http Mechanism . . . . . . . . . . .   <a href="#page-9">9</a>
   <a href="#section-4">4</a>.  Introduction to the HOBA-js Mechanism . . . . . . . . . . . .  <a href="#page-10">10</a>
   <a href="#section-5">5</a>.  HOBA&#x27;s Authentication Process . . . . . . . . . . . . . . . .  <a href="#page-11">11</a>
     <a href="#section-5.1">5.1</a>.  CPK Preparation Phase . . . . . . . . . . . . . . . . . .  <a href="#page-11">11</a>
     <a href="#section-5.2">5.2</a>.  Signing Phase . . . . . . . . . . . . . . . . . . . . . .  <a href="#page-11">11</a>
     <a href="#section-5.3">5.3</a>.  Authentication Phase  . . . . . . . . . . . . . . . . . .  <a href="#page-11">11</a>
   <a href="#section-6">6</a>.  Other Parts of the HOBA Process . . . . . . . . . . . . . . .  <a href="#page-12">12</a>
     <a href="#section-6.1">6.1</a>.  Registration  . . . . . . . . . . . . . . . . . . . . . .  <a href="#page-13">13</a>
       <a href="#section-6.1.1">6.1.1</a>.  Hobareg Definition  . . . . . . . . . . . . . . . . .  <a href="#page-14">14</a>
     <a href="#section-6.2">6.2</a>.  Associating Additional Keys to an Existing Account  . . .  <a href="#page-16">16</a>
       <a href="#section-6.2.1">6.2.1</a>.  Moving Private Keys . . . . . . . . . . . . . . . . .  <a href="#page-16">16</a>
       6.2.2.  Human-Memorable One-Time Password (Don&#x27;t Do This One)  16
       <a href="#section-6.2.3">6.2.3</a>.  Out-of-Band URL . . . . . . . . . . . . . . . . . . .  <a href="#page-17">17</a>
     <a href="#section-6.3">6.3</a>.  Logging Out . . . . . . . . . . . . . . . . . . . . . . .  <a href="#page-17">17</a>
     <a href="#section-6.4">6.4</a>.  Getting a Fresh Challenge . . . . . . . . . . . . . . . .  <a href="#page-17">17</a>
   <a href="#section-7">7</a>.  Mandatory-to-Implement Algorithms . . . . . . . . . . . . . .  <a href="#page-18">18</a>
   <a href="#section-8">8</a>.  Security Considerations . . . . . . . . . . . . . . . . . . .  <a href="#page-18">18</a>
     <a href="#section-8.1">8.1</a>.  Privacy Considerations  . . . . . . . . . . . . . . . . .  <a href="#page-18">18</a>
     <a href="#section-8.2">8.2</a>.  localStorage Security for JavaScript  . . . . . . . . . .  <a href="#page-19">19</a>
     <a href="#section-8.3">8.3</a>.  Multiple Accounts on One User Agent . . . . . . . . . . .  <a href="#page-20">20</a>
     <a href="#section-8.4">8.4</a>.  Injective Mapping for HOBA-TBS  . . . . . . . . . . . . .  <a href="#page-20">20</a>
   <a href="#section-9">9</a>.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  <a href="#page-21">21</a>
     <a href="#section-9.1">9.1</a>.  HOBA Authentication Scheme  . . . . . . . . . . . . . . .  <a href="#page-21">21</a>
     <a href="#section-9.2">9.2</a>.  .well-known URI . . . . . . . . . . . . . . . . . . . . .  <a href="#page-21">21</a>
     <a href="#section-9.3">9.3</a>.  Algorithm Names . . . . . . . . . . . . . . . . . . . . .  <a href="#page-21">21</a>
     <a href="#section-9.4">9.4</a>.  Key Identifier Types  . . . . . . . . . . . . . . . . . .  <a href="#page-22">22</a>



<span class="grey">Farrell, et al.               Experimental                      [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


     <a href="#section-9.5">9.5</a>.  Device Identifier Types . . . . . . . . . . . . . . . . .  <a href="#page-22">22</a>
     <a href="#section-9.6">9.6</a>.  Hobareg HTTP Header Field . . . . . . . . . . . . . . . .  <a href="#page-23">23</a>
   <a href="#section-10">10</a>. References  . . . . . . . . . . . . . . . . . . . . . . . . .  <a href="#page-23">23</a>
     <a href="#section-10.1">10.1</a>.  Normative References . . . . . . . . . . . . . . . . . .  <a href="#page-23">23</a>
     <a href="#section-10.2">10.2</a>.  Informative References . . . . . . . . . . . . . . . . .  <a href="#page-24">24</a>
   <a href="#appendix-A">Appendix A</a>.  Problems with Passwords  . . . . . . . . . . . . . .  <a href="#page-26">26</a>
   <a href="#appendix-B">Appendix B</a>.  Example  . . . . . . . . . . . . . . . . . . . . . .  <a href="#page-27">27</a>
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  <a href="#page-28">28</a>
   Authors&#x27; Addresses  . . . . . . . . . . . . . . . . . . . . . . .  <a href="#page-28">28</a>

<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>.  Introduction</span>

   HTTP Origin-Bound Authentication (HOBA) is an authentication design
   that can be used as an HTTP authentication scheme [<a href="/doc/html/rfc7235" title="&quot;Hypertext Transfer Protocol (HTTP/1.1): Authentication&quot;">RFC7235</a>] and for
   JavaScript-based authentication embedded in HTML.  The main goal of
   HOBA is to offer an easy-to-implement authentication scheme that is
   not based on passwords but that can easily replace HTTP or HTML
   forms-based password authentication.  Deployment of HOBA can reduce
   or eliminate password entries in databases, with potentially
   significant security benefits.

   HOBA is an HTTP authentication mechanism that complies with the
   framework for such schemes [<a href="/doc/html/rfc7235" title="&quot;Hypertext Transfer Protocol (HTTP/1.1): Authentication&quot;">RFC7235</a>].  As a JavaScript design, HOBA
   demonstrates a way for clients and servers to interact using the same
   credentials that are used by the HTTP authentication scheme.

   Current username/password authentication methods such as HTTP Basic,
   HTTP Digest, and web forms have been in use for many years but are
   susceptible to theft of server-side password databases.  Instead of
   passwords, HOBA uses digital signatures in a challenge-response
   scheme as its authentication mechanism.  HOBA also adds useful
   features such as credential management and session logout.  In HOBA,
   the client creates a new public-private key pair for each host (&quot;web
   origin&quot; [<a href="/doc/html/rfc6454" title="&quot;The Web Origin Concept&quot;">RFC6454</a>]) to which it authenticates.  These keys are used in
   HOBA for HTTP clients to authenticate themselves to servers in the
   HTTP protocol or in a JavaScript authentication program.

   HOBA session management is identical to username/password session
   management, with a server-side session management tool or script
   inserting a session cookie [<a href="/doc/html/rfc6265" title="&quot;HTTP State Management Mechanism&quot;">RFC6265</a>] into the output to the browser.
   Use of Transport Layer Security (TLS) for the HTTP session is still
   necessary to prevent session cookie hijacking.

   HOBA keys are &quot;bare keys&quot;, so there is no need for the semantic
   overhead of X.509 public key certificates, particularly with respect
   to naming and trust anchors.  The Client Public Key (CPK) structures





<span class="grey">Farrell, et al.               Experimental                      [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   in HOBA do not have any publicly visible identifier for the user who
   possesses the corresponding private key, nor the web origin with
   which the client is using the CPK.

   HOBA also defines some services that are needed for modern HTTP
   authentication:

   o  Servers can bind a CPK with an identifier, such as an account
      name.  Servers using HOBA define their own policies for binding
      CPKs with accounts during account registration.

   o  Users are likely to use more than one device or User Agent (UA)
      for the same HTTP-based service, so HOBA gives a way to associate
      more than one CPK to the same account without having to register
      for each separately.

   o  Logout features can be useful for UAs, so HOBA defines a way to
      close a current HTTP &quot;session&quot;.

   o  Digital signatures can be expensive to compute, so HOBA defines a
      way for HTTP servers to indicate how long a given challenge value
      is valid, and a way for UAs to fetch a fresh challenge at any
      time.

   Users are also likely to lose a private key, or the client&#x27;s memory
   of which key pair is associated with which origin, such as when a
   user loses the computer or mobile device in which state is stored.
   HOBA does not define a mechanism for deleting the association between
   an existing CPK and an account.  Such a mechanism can be implemented
   at the application layer.

   The HOBA scheme is far from new; for example, the basic idea is
   pretty much identical to the first two messages from &quot;Mechanism R&quot; on
   page 6 of [<a href="#ref-MI93" title="&quot;Standardising authentication protocols based on public key techniques&quot;">MI93</a>], which predates HOBA by 20 years.

<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>.  Interfacing to Applications (Cookies)</span>

   HOBA can be used as a drop-in replacement for password-based user
   authentication schemes used in common web applications.  The simplest
   way is to (re)direct the UA to a HOBA &quot;Login&quot; URL and for the
   response to a successful HTTP request containing a HOBA signature to
   set a session cookie [<a href="/doc/html/rfc6265" title="&quot;HTTP State Management Mechanism&quot;">RFC6265</a>].  Further interactions with the web
   application will then be secured via the session cookie, as is
   commonly done today.







<span class="grey">Farrell, et al.               Experimental                      [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   While cookies are bearer tokens, and thus weaker than HOBA
   signatures, they are currently ubiquitously used.  If non-bearer
   token session continuation schemes are developed in the future in the
   IETF or elsewhere, then those can interface to HOBA as easily as with
   any password-based authentication scheme.

<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>.  Terminology</span>

   The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;,
   &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;NOT RECOMMENDED&quot;, &quot;MAY&quot;, and
   &quot;OPTIONAL&quot; in this document are to be interpreted as described in <a href="/doc/html/rfc2119">RFC</a>
   <a href="/doc/html/rfc2119">2119</a> [<a href="/doc/html/rfc2119" title="&quot;Key words for use in RFCs to Indicate Requirement Levels&quot;">RFC2119</a>].

   This specification uses the Augmented Backus-Naur Form (ABNF)
   notation of [<a href="/doc/html/rfc5234" title="&quot;Augmented BNF for Syntax Specifications: ABNF&quot;">RFC5234</a>].

   Account: The term &quot;account&quot; is (loosely) used to refer to whatever
   data structure(s) the server maintains that are associated with an
   identity.  That will contain at least one CPK and a web origin; it
   will also optionally include an HTTP &quot;realm&quot; as defined in the HTTP
   authentication specification [<a href="/doc/html/rfc7235" title="&quot;Hypertext Transfer Protocol (HTTP/1.1): Authentication&quot;">RFC7235</a>].  It might also involve many
   other non-standard pieces of data that the server accumulates as part
   of account creation processes.  An account may have many CPKs that
   are considered equivalent in terms of being usable for
   authentication, but the meaning of &quot;equivalent&quot; is really up to the
   server and is not defined here.

   Client public key (CPK): A CPK is the public key and associated
   cryptographic parameters needed for a server to validate a signature.

   HOBA-http: We use this term when describing something that is
   specific to HOBA as an HTTP authentication mechanism.

   HOBA-js: We use this term when describing something that is unrelated
   to HOBA-http but is relevant for HOBA as a design pattern that can be
   implemented in a browser in JavaScript.

   User agent (UA): typically, but not always, a web browser.

   User: a person who is running a UA.  In this document, &quot;user&quot; does
   not mean &quot;user name&quot; or &quot;account name&quot;.

   Web client: the content and JavaScript code that run within the
   context of a single UA instance (such as a tab in a web browser).







<span class="grey">Farrell, et al.               Experimental                      [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


<span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a>.  Step-by-Step Overview of HOBA-http</span>

   Step-by-step, a typical HOBA-http registration and authentication
   flow might look like this:

   1.  The client connects to the server and makes a request, and the
       server&#x27;s response includes a WWW-Authenticate header field that
       contains the &quot;HOBA&quot; auth-scheme, along with associated parameters
       (see <a href="#section-3">Section 3</a>).

   2.  If the client was not already registered with the web origin and
       realm it is trying to access, the &quot;joining&quot; process is invoked
       (see <a href="#section-6.1">Section 6.1</a>).  This creates a key pair and makes the CPK
       known to the server so that the server can carry out the account
       creation processes required.

   3.  The client uses the challenge from the HOBA auth-scheme
       parameters, along with other information it knows about the web
       origin and realm, to create and sign a HOBA to-be-signed (HOBA-
       TBS) string (see <a href="#section-2">Section 2</a>).

   4.  The client creates a HOBA client-result (HOBA-RES), using the
       signed HOBA-TBS for the &quot;sig&quot; value (see <a href="#section-2">Section 2</a>).

   5.  The client includes the Authorization header field in its next
       request, using the &quot;HOBA&quot; auth-scheme and putting the HOBA
       client-result in an auth-param named &quot;result&quot; (see <a href="#section-3">Section 3</a>).

   6.  The server authenticates the HOBA client-result (see
       <a href="#section-5.1">Section 5.1</a>).

   7.  Typically, the server&#x27;s response includes a session cookie that
       allows the client to indicate its authentication state in future
       requests (see <a href="#section-1.1">Section 1.1</a>).

<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>.  The HOBA Authentication Scheme</span>

   A UA that implements HOBA maintains a list of web origins and realms.
   The UA also maintains one or more client credentials for each web
   origin/realm combination for which it has created a CPK.

   On receipt of a challenge (and optional realm) from a server, the
   client marshals a HOBA-TBS blob that includes a client generated
   nonce, the web origin, the realm, an identifier for the CPK, and the
   challenge string, and signs that blob with the private key
   corresponding to the CPK for that web origin.  The formatting chosen





<span class="grey">Farrell, et al.               Experimental                      [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   for this TBS blob is chosen so as to make server-side signature
   verification as simple as possible for a wide range of current server
   tooling.

   Figure 1 specifies the ABNF for the signature input.  The term
   &quot;unreserved&quot; means that the field does not have a specific format
   defined and allows the characters specified in <a href="/doc/html/rfc3986#section-2.3">Section&nbsp;2.3 of
   [RFC3986]</a>.

      HOBA-TBS = len &quot;:&quot; nonce
              len &quot;:&quot; alg
              len &quot;:&quot; origin
              len &quot;:&quot; [ realm  ]
              len &quot;:&quot; kid
              len &quot;:&quot; challenge
      len = 1*DIGIT
      nonce = 1*base64urlchars
      alg = 1*2DIGIT
      origin = scheme &quot;://&quot; authority &quot;:&quot; port
      ; scheme, etc., are from <a href="/doc/html/rfc3986">RFC 3986</a>
      realm = unreserved
      ; realm is to be treated as in <a href="/doc/html/rfc7235#section-2.2">Section&nbsp;2.2 of RFC 7235</a>
      kid = 1*base64urlchars
      challenge = 1*base64urlchars
      ; Characters for Base64URL encoding from Table 2 of <a href="/doc/html/rfc4648">RFC 4648</a>
      ; all of which are US-ASCII (see <a href="/doc/html/rfc20">RFC 20</a>)
      base64urlchars = %x30-39             ; Digits
                    / %x41-5A           ; Uppercase letters
                    / %x61-7A           ; Lowercase letters
                    / &quot;-&quot; / &quot;_&quot; / &quot;=&quot;   ; Special characters

                   Figure 1: To-Be-Signed Data for HOBA

   The fields above contain the following:

   o  len: Each field is preceded by the number of octets of the
      following field, expressed as a decimal number in ASCII [<a href="/doc/html/rfc20" title="&quot;ASCII format for network interchange&quot;">RFC20</a>].
      Lengths are separated from field values by a colon character.  So
      if a nonce with the value &quot;ABCD&quot; were used, then that would be
      preceeded by &quot;4:&quot; (see the example in <a href="#appendix-B">Appendix B</a> for details).

   o  nonce: a random value chosen by the UA and MUST be base64url
      encoded before being included in the HOBA-TBS value. (base64url
      encoding is defined in [<a href="/doc/html/rfc4648" title="&quot;The Base16, Base32, and Base64 Data Encodings&quot;">RFC4648</a>]; guidelines for randomness are
      given in [<a href="/doc/html/rfc4086" title="&quot;Randomness Requirements for Security&quot;">RFC4086</a>].)  UAs MUST be able to use at least 32 bits of
      randomness in generating a nonce.  UAs SHOULD be able to use 64 or
      more bits of randomness for nonces.




<span class="grey">Farrell, et al.               Experimental                      [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   o  alg: specifies the signature algorithm being used.  See <a href="#section-7">Section 7</a>
      for details of algorithm support requirements.  The IANA-
      registered algorithm values (see <a href="#section-9.3">Section 9.3</a>) are encoded as one-
      or two-digit ASCII numbers.  For example, RSA-SHA256 (number 0) is
      encoded as the ASCII character &quot;0&quot; (0x30), while a future
      algorithm registered as number 17 would be encoded as the ASCII
      characters &quot;17&quot; (0x3137).

   o  origin: the web origin expressed as the concatenation of the
      scheme, authority, and port from [<a href="/doc/html/rfc3986" title="&quot;Uniform Resource Identifier (URI): Generic Syntax&quot;">RFC3986</a>].  These are not base64
      encoded, as they will be most readily available to the server in
      plain text.  For example, if accessing the URL
      &quot;https://www.example.com:8080/foo&quot;, then the bytes input to the
      signature process will be &quot;https://www.example.com:8080&quot;.  There
      is no default for the port number, and the port number MUST be
      present.

   o  realm: a string with the syntactic restrictions defined in
      [<a href="/doc/html/rfc7235" title="&quot;Hypertext Transfer Protocol (HTTP/1.1): Authentication&quot;">RFC7235</a>].  If no realm is specified for this authentication, then
      this is absent but is preceeded by a length of zero (&quot;0:&quot;).
      Recall that both sides know when this needs to be there,
      independent of the encoding via a zero length.

   o  kid: a key identifier.  This MUST be a base64url-encoded value
      that is presented to the server in the HOBA client result (see
      below).

   o  challenge: MUST be a base64url-encoded challenge value that the
      server chose to send to the client.  The challenge MUST be chosen
      so that it is infeasible to guess and SHOULD be indistinguishable
      from (the base64url encoding of) a random string that is at least
      128 bits long.

   The HOBA-TBS string is the input to the client&#x27;s signing process but
   is not itself sent over the network since some fields are already
   inherent in the HTTP exchange.  The challenge, however, is sent over
   the network so as to reduce the amount of state that needs to be
   maintained by servers.  (One form of stateless challenge might be a
   ciphertext that the server decrypts and checks, but that is an
   implementation detail.)  The value that is sent over the network by
   the UA is the HOBA &quot;client result&quot;, which we now define.

   The HOBA &quot;client result&quot; is a dot-separated string that includes the
   signature and is sent in the HTTP Authorization header field value
   using the value syntax defined in Figure 2.  The &quot;sig&quot; value is the
   base64url-encoded version of the binary output of the signing
   process.  The kid, challenge, and nonce are as defined above and are
   also base64url encoded.



<span class="grey">Farrell, et al.               Experimental                      [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


      HOBA-RES = kid &quot;.&quot; challenge &quot;.&quot; nonce &quot;.&quot; sig
      sig = 1*base64urlchars

                    Figure 2: HOBA Client Result Value

   If a malformed message of any kind is received by a server, the
   server MUST fail authentication.  If a malformed message of any kind
   is received by a client, the client MUST abandon that authentication
   attempt.  (The client is, of course, free to start another
   authentication attempt if it desires.)

<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>.  Introduction to the HOBA-http Mechanism</span>

   An HTTP server that supports HOBA authentication includes the &quot;HOBA&quot;
   auth-scheme value in a WWW-Authenticate header field when it wants
   the client to authenticate with HOBA.  Note that the HOBA auth-scheme
   might not be the only one that the server includes in a WWW-
   Authenticate header.

   The HOBA scheme has two REQUIRED attributes (challenge and max-age)
   and one OPTIONAL attribute (realm):

   o  The &quot;challenge&quot; attribute MUST be included.  The challenge is the
      string made up of the base64url-encoded octets that the server
      wants the client to sign in its response.  The challenge MUST be
      unique for every 401 HTTP response in order to prevent replay
      attacks from passive observers.

   o  A &quot;max-age&quot; attribute MUST be included.  It specifies the number
      of seconds from the time the HTTP response is emitted for which
      responses to this challenge can be accepted; for example, &quot;max-
      age: 10&quot; would indicate ten seconds.  If max-age is set to zero,
      then that means that only one signature will be accepted for this
      challenge.

   o  A &quot;realm&quot; attribute MAY be included to indicate the scope of
      protection in the manner described in HTTP/1.1, Authentication
      [<a href="/doc/html/rfc7235" title="&quot;Hypertext Transfer Protocol (HTTP/1.1): Authentication&quot;">RFC7235</a>].  The &quot;realm&quot; attribute MUST NOT appear more than once.

   When the &quot;client response&quot; is created, the UA encodes the HOBA
   client-result and returns that in the Authorization header.  The
   client-result is a string matching the HOBA-RES production in
   Figure 2 as an auth-param with the name &quot;result&quot;.

   The server MUST check the cryptographic correctness of the signature
   based on a public key it knows for the kid in the signatures, and if
   the server cannot do that, or if the signature fails cryptographic
   checks, then validation has failed.  The server can use any



<span class="grey">Farrell, et al.               Experimental                      [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   additional mechanisms to validate the signature.  If the validation
   fails, or if the server chooses to reject the signature for any
   reason whatsoever, the server fails the request with a 401
   Unauthorized HTTP response.

   The server MUST check that the same web origin is used in all of the
   server&#x27;s TLS server certificates, the URL being accessed, and the
   HOBA signature.  If any of those checks fail, the server treats the
   signature as being cryptographically incorrect.

   Note that a HOBA signature is good for however long a non-zero max-
   age parameter allows.  This means that replay is possible within the
   time window specified by the &quot;max-age&quot; value chosen by the server.
   Servers can attempt to detect any such replay (via caching if they so
   choose) and MAY react to such replays by responding with a second (or
   subsequent) 401 HTTP response containing a new challenge.

   To optimize their use of challenges, UAs MAY prefetch a challenge
   value, for example, after (max-age)/2 seconds have elapsed, using the
   &quot;.well-known/hoba/getchal&quot; scheme described later in this document.
   This also allows for precalculation of HOBA signatures, if that is
   required in order to produce a responsive user interface.

<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>.  Introduction to the HOBA-js Mechanism</span>

   Web sites using JavaScript can also perform origin-bound
   authentication without needing to involve the HTTP layer and by
   inference not needing HOBA-http support in browsers.  HOBA-js is not
   an on-the-wire protocol like HOBA-http is; instead, it is a design
   pattern that can be realized completely in JavaScript served in
   normal HTML pages.

   One thing that is highly desirable for HOBA-js is WebCrypto (see
   &lt;<a href="https://www.w3.org/TR/WebCryptoAPI">http://www.w3.org/TR/WebCryptoAPI</a>&gt;), which is (at the time of
   writing) starting to see deployment.  In lieu of WebCrypto,
   JavaScript crypto libraries can be employed with the known
   deficiencies of their pseudo-random number generators and the general
   immaturity of those libraries.

   Without Webcrypto, one element is required for HOBA-js; localStorage
   (see &lt;<a href="https://www.w3.org/TR/webstorage/">http://www.w3.org/TR/webstorage/</a>&gt;) from HTML5 can be used for
   persistent key storage.  For example, an implementation would store a
   dictionary account identifier as well as public key and private key
   tuples in the origin&#x27;s localStorage for subsequent authentication
   requests.  How this information is actually stored in localStorage is
   an implementation detail.  This type of key storage relies on the
   security properties of the same-origin policy that localStorage
   enforces.  See the security considerations for discussion about



<span class="grey">Farrell, et al.               Experimental                     [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   attacks on localStorage.  Note that IndexedDB (see
   &lt;<a href="https://www.w3.org/TR/IndexedDB/">http://www.w3.org/TR/IndexedDB/</a>&gt;) is an alternative to localStorage
   that can also be used here and that is used by WebCrypto.

   Because of JavaScript&#x27;s same-origin policy, scripts from subdomains
   do not have access to the same localStorage that scripts in their
   parent domains do.  For larger or more complex sites, this could be
   an issue that requires enrollment into subdomains, which could be
   difficult for users.  One way to get around this is to use session
   cookies because they can be used across subdomains.  That is, with
   HOBA-js, the user might log in using a single well-known domain, and
   then session cookies are used whilst the user navigates around the
   site.

<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>.  HOBA&#x27;s Authentication Process</span>

   This section describes how clients and servers use HOBA for
   authentication.  The interaction between an HTTP client and HTTP
   server using HOBA happens in three phases: the CPK preparation phase,
   the signing phase, and the authentication phase.  This section also
   covers the actions that give HOBA features similar to today&#x27;s
   password-based schemes.

<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>.  CPK Preparation Phase</span>

   In the CPK preparation phase, the client determines if it already has
   a CPK for the web origin with which it needs to authenticate.  If the
   client has a CPK, the client will use it; if the client does not have
   a CPK, it generates one in anticipation of the server asking for one.

<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>.  Signing Phase</span>

   In the signing phase, the client connects to the server, the server
   asks for HOBA-based authentication, and the client authenticates by
   signing a blob of information as described in the previous sections.

<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>.  Authentication Phase</span>

   The authentication phase is completely dependent on the policies and
   practices of the server.  That is, this phase involves no
   standardized protocol in HOBA-http; in HOBA-js, there is no suggested
   interaction template.

   In the authentication phase, the server uses the key identifier (kid)
   to determine the CPK from the signing phase and decides if it
   recognizes the CPK.  If the server recognizes the CPK, the server may
   finish the client authentication process.




<span class="grey">Farrell, et al.               Experimental                     [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   If this stage of the process involves additional information for
   authentication, such as asking the user which account she wants to
   use (in the case where a UA is used for multiple accounts on a site),
   the server can prompt the user for account identifying information,
   or the user could choose based on HTML offered by the server before
   the 401 response is triggered.  None of this is standardized: it all
   follows the server&#x27;s security policy and session flow.  At the end of
   this, the server probably assigns or updates a session cookie for the
   client.

   During the authentication phase, if the server cannot determine the
   correct CPK, it could use HTML and JavaScript to ask the user if they
   are really a new user or want to associate this new CPK with another
   CPK.  The server can then use some out-of-band method (such as a
   confirmation email round trip, SMS, or a UA that is already enrolled)
   to verify that the &quot;new&quot; user is the same as the already-enrolled
   one.  Thus, logging in on a new UA is identical to logging in with an
   existing account.

   If the server does not recognize the CPK, the server might send the
   client through either a join or login-new-UA (see below) process.
   This process is completely up to the server and probably entails
   using HTML and JavaScript to ask the user some questions in order to
   assess whether or not the server wants to give the client an account.
   Completion of the joining process might require confirmation by
   email, SMS, CAPTCHA, and so on.

   Note that there is no necessity for the server to initiate a joining
   or login process upon completion of the signing phase.  Indeed, the
   server may desire to challenge the UA even for unprotected resources
   and set a session cookie for later use in a join or login process as
   it becomes necessary.  For example, a server might only want to offer
   an account to someone who had been to a few pages on the web site; in
   such a case, the server could use the CPK from an associated session
   cookie as a way of building reputation for the user until the server
   wants the user to join.

<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>.  Other Parts of the HOBA Process</span>

   The authentication process is more than just the act of
   authentication.  In password-based authentication and HOBA, there are
   other processes that are needed both before and after an
   authentication step.  This section covers those processes.  Where
   possible, it combines practices of HOBA-http and HOBA-js; where that
   is not possible, the differences are called out.






<span class="grey">Farrell, et al.               Experimental                     [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   All HOBA interactions other than those defined in <a href="#section-5">Section 5</a> MUST be
   performed in TLS-protected sessions [<a href="/doc/html/rfc5246" title="&quot;The Transport Layer Security (TLS) Protocol Version 1.2&quot;">RFC5246</a>].  If the current HTTP
   traffic is not running under TLS, a new session is started before any
   of the actions described here are performed.

   HOBA-http uses a well-known URI [<a href="/doc/html/rfc5785" title="&quot;Defining Well-Known Uniform Resource Identifiers (URIs)&quot;">RFC5785</a>] &quot;hoba&quot; as a base URI for
   performing many tasks: &quot;https://www.example.com/.well-known/hoba&quot;.
   These URIs are based on the name of the host that the HTTP client is
   accessing.

   There are many use cases for these URLs to redirect to other URLs: a
   site that does registration through a federated site, a site that
   only does registration under HTTPS, and so on.  Like any HTTP client,
   HOBA-http clients have to be able to handle redirection of these
   requests.  However, as that would potentially cause security issues
   when a re-direct brings the client to a different web origin, servers
   implementing HOBA-http SHOULD NOT redirect to a different web origin
   from below &quot;.well-known/hoba&quot; URLs.  The above is considered
   sufficient to allow experimentation with HOBA, but if at some point
   HOBA is placed on the Standards Track, then a full analysis of off-
   origin redirections would need to be documented.

<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>.  Registration</span>

   Normally, a registration (also called &quot;joining&quot;) is expected to
   happen after a UA receives a 401 response for a web origin and realm
   (for HOBA-http) or on demand (for HOBA-js) for which it has no
   associated CPK.  The process of registration for a HOBA account on a
   server is relatively lightweight.  The UA generates a new key pair
   and associates it with the web origin/realm in question.

   Note that if the UA has a CPK associated with the web origin, but not
   for the realm concerned, then a new registration is REQUIRED.  If the
   server did not wish for that outcome, then it ought to use the same
   or no realm.

   The registration message for HOBA-http is sent as a POST message to
   the URL &quot;.well-known/hoba/register&quot; with an HTML form (x-www-form-
   encoded, see &lt;<a href="https://www.w3.org/TR/2014/REC-html5-20141028/forms.html#url-encoded-form-data">http://www.w3.org/TR/2014/REC-html5-20141028/</a>
   <a href="https://www.w3.org/TR/2014/REC-html5-20141028/forms.html#url-encoded-form-data">forms.html#url-encoded-form-data</a>&gt;), described below.  The
   registration message for HOBA-js can be in any format specified by
   the server, but it could be the same as the one described here for
   HOBA-http.  It is up to the server to decide what kind of user
   interaction is required before the account is finally set up.  When
   the server&#x27;s chosen registration flow is completed successfully, the
   server MUST add a Hobareg HTTP header (see <a href="#section-6.1.1">Section 6.1.1</a>) to the HTTP
   response message that completes the registration flow.




<span class="grey">Farrell, et al.               Experimental                     [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   The registration message sent to the server has one mandatory field
   (pub) and some optional fields that allow the UA to specify the type
   and value of key and device identifiers that the UA wishes to use.

   o  pub: a mandatory field containing the Privacy Enhanced Mail (PEM)
      formatted public key of the client.  See <a href="/doc/html/rfc6376#appendix-C">Appendix&nbsp;C of [RFC6376]</a>
      for an example of how to generate this key format.

   o  kidtype: contains the type of key identifier.  This is a numeric
      value intended to contain one of the values from <a href="#section-9.4">Section 9.4</a>.  If
      this is not present, then the mandatory-to-implement hashed public
      key option MUST be used.

   o  kid: contains the key identifier as a base64url-encoded string
      that is of the type indicated in the kidtype.  If the kid is a
      hash of a public key, then the correct (base64url-encoded) hash
      value MUST be provided and the server SHOULD check that and refuse
      the registration if an incorrect value was supplied.

   o  didtype: specifies a kind of device identifier intended to contain
      one of the values from <a href="#section-9.5">Section 9.5</a>.  If absent, then the &quot;string&quot;
      form of device identifier defined in <a href="#section-9.5">Section 9.5</a> MUST be used.

   o  did: a UTF-8 string that specifies the device identifier.  This
      can be used to help a user be confident that authentication has
      worked, e.g., following authentication, some web content might say
      &quot;You last logged in from device &#x27;did&#x27; at time T.&quot;

   Note that replay of registration (and other HOBA) messages is quite
   possible.  That, however, can be counteracted if challenge freshness
   is ensured.  See <a href="#section-2">Section 2</a> for details.  Note also that with HOBA-
   http, the HOBA signature does not cover the POST message body.  If
   that is required, then HOBA-JS may be a better fit for registration
   and other account management actions.

<span class="h4"><a class="selflink" id="section-6.1.1" href="#section-6.1.1">6.1.1</a>.  Hobareg Definition</span>

   Since registration can often be a multi-step process, e.g., requiring
   a user to fill in contact details, the initial response to the HTTP
   POST message defined above may not be the end of the registration
   process even though the HTTP response has a 200 OK status.  This
   creates an issue for the UA since, during the registration process
   (e.g., while dealing with interstitial pages), the UA doesn&#x27;t yet
   know whether the CPK is good for that web origin or not.

   For this reason, the server MUST add a header field to the response
   message when the registration has succeeded in order to indicate the
   new state.  The header to be used is &quot;Hobareg&quot;, and the value when



<span class="grey">Farrell, et al.               Experimental                     [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   registration has succeeded is to be &quot;regok&quot;.  When registration is in
   an intermediate state (e.g., on an HTTP response for an interstitial
   page), the server MAY add this header with a value of &quot;reginwork&quot;.
   See <a href="#section-9.6">Section 9.6</a> for the relevant IANA registration of this header
   field.

   For interstitial pages, the client MAY include a HOBA Authorization
   header.  This is not considered a &quot;MUST&quot;, as that might needlessly
   complicate client implementations, but is noted here in case a server
   implementer assumes that all registration messages contain a HOBA
   Authorization header.

      Hobareg-val = &quot;regok&quot; / &quot;reginwork&quot;

                 Figure 3: Hobareg Header Field Definition

   Figure 3 provides an ABNF definition for the values allowed in the
   Hobareg header field.  Note that these (and the header field name)
   are case insensitive.  <a href="/doc/html/rfc7231#section-8.3.1">Section&nbsp;8.3.1 of [RFC7231]</a> calls for
   documenting the following details for this new header field:

   o  Only one single value is allowed in a Hobareg header field.
      Should more than one (a list) be encountered, or any other ABNF-
      invalid value, that SHOULD be interpreted as being the same as
      &quot;reginwork&quot;.

   o  The Hobareg header field can only be used in HTTP responses.

   o  Since Hobareg is only meant for responses, it ought not appear in
      requests.

   o  The HTTP response code does affect the interpretation of Hobareg.
      Registration is only considered to have succeeded if the regok
      value is seen in a 2xx response.  4xx and other errors mean that
      registration has failed regardless of the value of Hobareg seen.
      The request method has no influence on the interpretation of
      Hobareg.

   o  Intermediaries never insert, delete, or modify a Hobareg header
      field.

   o  As a response-only header field, it is not appropriate to list a
      Hobareg in a Vary response header field.

   o  Hobareg is allowed in trailers.

   o  As a response-only header field, Hobareg will not be preserved
      across re-directs.



<span class="grey">Farrell, et al.               Experimental                     [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   o  Hobareg itself discloses little security- or privacy-sensitive
      information.  If an attacker can somehow detect that a Hobareg
      header field is being added, then that attacker would know that
      the UA is in the process of registration, which could be
      significant.  However, it is likely that the set of messages
      between the UA and server would expose this information in many
      cases, regardless of whether or not TLS is used.  Using TLS is
      still, however, a good plan.

<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>.  Associating Additional Keys to an Existing Account</span>

   From the user perspective, the UA having a CPK for a web origin will
   often appear to be the same as having a way to sign in to an account
   at that web site.  Since users often have more than one UA, and since
   the CPKs are, in general, UA specific, that raises the question of
   how the user can sign in to that account from different UAs.  And
   from the server perspective, that turns into the question of how to
   safely bind different CPKs to one account.  In this section, we
   describe some ways in which this can be done, as well as one way in
   which this ought not be done.

   Note that the context here is usually that the user has succeeded in
   registering with one or more UAs (for the purposes of this section,
   we call this &quot;the first UA&quot; below) and can use HOBA with those, and
   the user is now adding another UA.  The newest UA might or might not
   have a CPK for the site in question.  Since it is in fact trivial, we
   assume that the site is able to put in place some appropriate,
   quicker, easier registration for a CPK for the newest UA.  The issue
   then becomes one of binding the CPK from the newest UA with those of
   other UAs bound to the account.

<span class="h4"><a class="selflink" id="section-6.2.1" href="#section-6.2.1">6.2.1</a>.  Moving Private Keys</span>

   It is common for a user to have multiple UAs and to want all those
   UAs to be able to authenticate to a single account.  One method to
   allow a user who has an existing account to be able to authenticate
   on a second device is to securely transport the private and public
   keys and the origin information from the first device to the second.
   If this approach is taken, then there is no impact on the HOBA-http
   or HOBA-js, so this is a pure UA implementation issue and not
   discussed further.

<span class="h4"><a class="selflink" id="section-6.2.2" href="#section-6.2.2">6.2.2</a>.  Human-Memorable One-Time Password (Don&#x27;t Do This One)</span>

   It will be tempting for implementers to use a human-memorable One-
   Time Password (OTP) in order to &quot;authenticate&quot; binding CPKs to the
   same account.  The workflow here would likely be something along the
   lines of some server administrative utility generating a human-



<span class="grey">Farrell, et al.               Experimental                     [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   memorable OTP such as &quot;1234&quot; and sending that to the user out of band
   for the user to enter at two web pages, each authenticated via the
   relevant CPK.  While this seems obvious enough and could even be
   secure enough in some limited cases, we consider that this is too
   risky to use in the Internet, and so servers SHOULD NOT provide such
   a mechanism.  The reason this is so dangerous is that it would be
   trivial for an automated client to guess such tokens and &quot;steal&quot; the
   binding intended for some other user.  At any scale, there would
   always be some in-process bindings so that even with only a trickle
   of guesses (and hence not being detectable via message volume), an
   attacker would have a high probability of succeeding in registering a
   binding with the attacker&#x27;s CPK.

   This method of binding CPKs together is therefore NOT RECOMMENDED.

<span class="h4"><a class="selflink" id="section-6.2.3" href="#section-6.2.3">6.2.3</a>.  Out-of-Band URL</span>

   One easy binding method is to simply provide a web page where, using
   the first UA, the user can generate a URL (containing some
   &quot;unguessable&quot; cryptographically generated value) that the user then
   later dereferences on the newest UA.  The user could email that URL
   to herself, for example, or the web server accessed at the first UA
   could automatically do that.

   Such a URL SHOULD contain at least the equivalent of 128 bits of
   randomness.

<span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a>.  Logging Out</span>

   The user can tell the server it wishes to log out.  With HOBA-http,
   this is done by sending a HOBA-authenticated POST message to the URL
   &quot;.well-known/hoba/logout&quot; on the site in question.  The UA SHOULD
   also delete session cookies associated with the session so that the
   user&#x27;s state is no longer &quot;logged in.&quot;

   The server MUST NOT allow TLS session resumption for any logged out
   session.

   The server SHOULD also revoke or delete any cookies associated with
   the session.

<span class="h3"><a class="selflink" id="section-6.4" href="#section-6.4">6.4</a>.  Getting a Fresh Challenge</span>

   The UA can get a &quot;fresh&quot; challenge from the server.  In HOBA-http, it
   sends a POST message to &quot;.well-known/hoba/getchal&quot;.  If successful,
   the response MUST contain a fresh (base64url-encoded) HOBA challenge
   for this origin in the body of the response.  Whitespace in the
   response MUST be ignored.



<span class="grey">Farrell, et al.               Experimental                     [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>.  Mandatory-to-Implement Algorithms</span>

   RSA-SHA256 MUST be supported.  HOBA implementations MUST use RSA-
   SHA256 if it is provided by the underlying cryptographic libraries.
   RSA-SHA1 MAY be used.  RSA modulus lengths of at least 2048 bits
   SHOULD be used.  RSA indicates the RSASSA-PKCS1-v1_5 algorithm
   defined in <a href="/doc/html/rfc3447#section-8.2">Section&nbsp;8.2 of [RFC3447]</a>, and SHA-1 and SHA-256 are
   defined in [<a href="#ref-SHS" title="&quot;Secure Hash Standard (SHS)&quot;">SHS</a>].  Keys with moduli shorter than 2048 bits SHOULD
   only be used in cases where generating 2048-bit (or longer) keys is
   impractical, e.g., on very constrained or old devices.

<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>.  Security Considerations</span>

   Binding my CPK with someone else&#x27;s account would be fun and
   profitable so SHOULD be appropriately hard.  In particular, URLs or
   other values generated by the server as part of any CPK binding
   process MUST be hard to guess, for whatever level of difficulty is
   chosen by the server.  The server SHOULD NOT allow a random guess to
   reveal whether or not an account exists.

   If key binding was server selected, then a bad actor could bind
   different accounts belonging to the user from the network with
   possible bad consequences, especially if one of the private keys was
   compromised somehow.

   When the max-age parameter is not zero, then a HOBA signature has a
   property that is like a bearer token for the relevant number of
   seconds: it can be replayed for a server-selected duration.
   Similarly, for HOBA-js, signatures might be replayable depending on
   the specific implementation.  The security considerations of
   [<a href="/doc/html/rfc6750" title="&quot;The OAuth 2.0 Authorization Framework: Bearer Token Usage&quot;">RFC6750</a>] therefore apply in any case where the HOBA signature can be
   replayed.  Server administrators can set the max-age to the minimum
   acceptable value in such cases, which would often be expected to be
   just a few seconds.  There seems to be no reason to ever set the max-
   age more than a few minutes; the value ought also decrease over time
   as device capabilities improve.  The administrator will most likely
   want to set the max-age to something that is not too short for the
   slowest signing device that is significant for that site.

<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>.  Privacy Considerations</span>

   HOBA does, to some extent, impact privacy and could be considered to
   represent a super-cookie to the server or to any entity on the path
   from UA to HTTP server that can see the HOBA signature.  This is
   because we need to send a key identifier as part of the signature and
   that will not vary for a given key.  For this reason, and others, it
   is strongly RECOMMENDED to only use HOBA over server-authenticated
   TLS and to migrate web sites using HOBA to only use &quot;https&quot; URLs.



<span class="grey">Farrell, et al.               Experimental                     [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   UAs SHOULD provide users a way to manage their CPKs.  Ideally, there
   would be a way for a user to maintain their HOBA details for a site
   while at the same time deleting other site information such as
   cookies or non-HOBA HTML5 localStorage.  However, as this is likely
   to be complex, and appropriate user interfaces counterintuitive, we
   expect that UAs that implement HOBA will likely treat HOBA
   information as just some more site data that would disappear should
   the user choose to &quot;forget&quot; that site.

   Device identifiers are intended to specify classes of device in a way
   that can assist with registration and with presentation to the user
   of information about previous sessions, e.g., last login time.
   Device identifier types MUST NOT be privacy sensitive, with values
   that would allow tracking a user in unexpected ways.  In particular,
   using a device identifier type that is analogous to the International
   Mobile Equipment Identifier (IMEI) would be a really bad idea and is
   the reason for the &quot;MUST NOT&quot; above.  In that case, &quot;mobile phone&quot;
   could be an acceptable choice.

   If possible, implementations ought to encourage the use of device
   identifier values that are not personally identifying except for the
   user concerned; for example, &quot;Alice&#x27;s mobile&quot; is likely to be chosen
   and is somewhat identifying, but &quot;Alice&#x27;s phone: UUID 1234-5567-
   89abc-def0&quot; would be a very bad choice.

<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>.  localStorage Security for JavaScript</span>

   The use of localStorage (likely with a non-WebCrypto implementation
   of HOBA-js) will undoubtedly be a cause for concern. localStorage
   uses the same-origin model that says that the scheme, domain, and
   port define a localStorage instance.  Beyond that, any code executing
   will have access to private keying material.  Of particular concern
   are Cross-Site Scripting (XSS) attacks, which could conceivably take
   the keying material and use it to create UAs under the control of an
   attacker.  XSS attacks are, in reality, devastating across the board
   since they can and do steal credit card information, passwords,
   perform illicit acts, etc.  It&#x27;s not evident that we are introducing
   unique threats from which cleartext passwords don&#x27;t already suffer.

   Another source of concern is local access to the keys.  That is, if
   an attacker has access to the UA itself, they could snoop on the key
   through a JavaScript console or find the file(s) that implement
   localStorage on the host computer.  Again, it&#x27;s not clear that we are
   worse in this regard because the same attacker could get at browser
   password files, etc., too.  One possible mitigation is to encrypt the
   keystore with a password/PIN that the user supplies.  This may sound
   counterintuitive, but the object here is to keep passwords off of




<span class="grey">Farrell, et al.               Experimental                     [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   servers to mitigate the multiplier effect of a large-scale compromise
   (e.g., [<a href="#ref-ThreatReport">ThreatReport</a>]) because of shared passwords across sites.

   It&#x27;s worth noting that HOBA uses asymmetric keys and not passwords
   when evaluating threats.  As various password database leaks have
   shown, the real threat of a password breach is not just to the site
   that was breached, it&#x27;s also to all of the sites on which a user used
   the same password.  That is, the collateral damage is severe because
   password reuse is common.  Storing a password in localStorage would
   also have a similar multiplier effect for an attacker, though perhaps
   on a smaller scale than a server-side compromise: one successful
   crack gains the attacker potential access to hundreds if not
   thousands of sites the user visits.  HOBA does not suffer from that
   attack multiplier since each asymmetric key pair is unique per
   site/UA/user.

<span class="h3"><a class="selflink" id="section-8.3" href="#section-8.3">8.3</a>.  Multiple Accounts on One User Agent</span>

   A shared UA with multiple accounts is possible if the account
   identifier is stored along with the asymmetric key pair binding them
   to one another.  Multiple entries can be kept, one for each account,
   and selected by the current user.  This, of course, is fraught with
   the possibility for abuse, since a server is potentially enrolling
   the device for a long period and the user may not want to have to be
   responsible for the credential for that long.  To alleviate this
   problem, the user could request that the credential be erased from
   the browser.  Similarly, during the enrollment phase, a user could
   request that the key pair only be kept for a certain amount of time
   or that it not be stored beyond the current browser session.
   However, all such features really ought to be part of the operating
   system or platform and not part of a HOBA implementation, so those
   are not discussed further.

<span class="h3"><a class="selflink" id="section-8.4" href="#section-8.4">8.4</a>.  Injective Mapping for HOBA-TBS</span>

   The repeated length fields in the HOBA-TBS structure are present in
   order to ensure that there is no possibility that the catenation of
   different input values can cause confusion that might lead to an
   attack, either against HOBA as specified here, or else an attack
   against some other protocol that reused this to-be-signed structure.
   Those fields ensure that the mapping from input fields to the HOBA-
   TBS string is an injective mapping.









<span class="grey">Farrell, et al.               Experimental                     [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>.  IANA Considerations</span>

   IANA has made registrations and created new registries as described
   below.

   All new registries have been placed beneath a new &quot;HTTP Origin-Bound
   Authentication (HOBA) Parameters&quot; category.

<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>.  HOBA Authentication Scheme</span>

   A new scheme has been registered in the HTTP Authentication Scheme
   Registry as follows:

   Authentication Scheme Name: HOBA

   Reference: <a href="/doc/html/rfc7486#section-3">Section&nbsp;3 of RFC 7486</a>

   Notes (optional): The HOBA scheme can be used with either HTTP
   servers or proxies.  When used in response to a 407 Proxy
   Authentication Required indication, the appropriate proxy
   authentication header fields are used instead, as with any other HTTP
   authentication scheme.

<span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a>.  .well-known URI</span>

   A new .well-known URI has been registered in the Well-Known URIs
   registry as described below.

   URI Suffix: hoba

   Change Controller: IETF

   Reference: <a href="/doc/html/rfc7486#section-6">Section&nbsp;6 of RFC 7486</a>

   Related Information: N/A

<span class="h3"><a class="selflink" id="section-9.3" href="#section-9.3">9.3</a>.  Algorithm Names</span>

   A new HOBA signature algorithms registry has been created as follows,
   with Specification Required as the registration procedure.  New HOBA
   signature algorithms SHOULD be in use with other IETF Standards Track
   protocols before being added to this registry.

   Number       Meaning                         Reference
   -----------  ------------------------------  ------------
   0            RSA-SHA256                      <a href="/doc/html/rfc7486">RFC 7486</a>
   1            RSA-SHA1                        <a href="/doc/html/rfc7486">RFC 7486</a>




<span class="grey">Farrell, et al.               Experimental                     [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   RSA is defined in <a href="/doc/html/rfc3447#section-8.2">Section&nbsp;8.2 of [RFC3447]</a>, and SHA-1 and SHA-256 are
   defined in [<a href="#ref-SHS" title="&quot;Secure Hash Standard (SHS)&quot;">SHS</a>].

   For this registry, the number column should contain a small positive
   integer.  Following the ABNF in Figure 1, the maximum value for this
   is decimal 99.

<span class="h3"><a class="selflink" id="section-9.4" href="#section-9.4">9.4</a>.  Key Identifier Types</span>

   A new HOBA Key Identifier Types registry has been created as follows,
   with Specification Required as the registration procedure.

   Number       Meaning                         Reference
   -----------  ------------------------------  ------------
   0            a hashed public key             [<a href="/doc/html/rfc6698" title="&quot;The DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA&quot;">RFC6698</a>]
   1            a URI                           [<a href="/doc/html/rfc3986" title="&quot;Uniform Resource Identifier (URI): Generic Syntax&quot;">RFC3986</a>]
   2            an unformatted string, at the   <a href="/doc/html/rfc7486">RFC 7486</a>
                user&#x27;s/UA&#x27;s whim

   For the number 0, hashed public keys are as done in DNS-Based
   Authentication of Named Entities (DANE) [<a href="/doc/html/rfc6698" title="&quot;The DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA&quot;">RFC6698</a>].

   For this registry, the number column should contain a small positive
   integer.

<span class="h3"><a class="selflink" id="section-9.5" href="#section-9.5">9.5</a>.  Device Identifier Types</span>

   A new HOBA Device Identifier Types registry has been created as
   follows, with Specification Required as the registration procedure.

   The designated expert for this registry is to carefully pay attention
   to the notes on this field in <a href="#section-8.1">Section 8.1</a>, in particular, the &quot;MUST
   NOT&quot; stated therein.

   Number       Meaning                         Reference
   -----------  ------------------------------  -----------
   0            an unformatted string, at the   <a href="/doc/html/rfc7486">RFC 7486</a>
                user&#x27;s/UA&#x27;s whim

   For this registry, the number column should contain a small positive
   integer.










<span class="grey">Farrell, et al.               Experimental                     [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


<span class="h3"><a class="selflink" id="section-9.6" href="#section-9.6">9.6</a>.  Hobareg HTTP Header Field</span>

   A new identifier has been registered in the Permanent Message Header
   Field Names registry as described below.

   Header Field Name: Hobareg

   Protocol: http (<a href="/doc/html/rfc7230">RFC 7230</a>)

   Status: experimental

   Author/Change controller: IETF

   Reference: <a href="/doc/html/rfc7486#section-6.1.1">Section&nbsp;6.1.1 of RFC 7486</a>

   Related information: N/A

<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>.  References</span>

<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>.  Normative References</span>

   [<a id="ref-RFC20">RFC20</a>]    Cerf, V., &quot;ASCII format for network interchange&quot;, STD 80,
              <a href="/doc/html/rfc20">RFC 20</a>, October 1969,
              &lt;<a href="https://www.rfc-editor.org/info/rfc20">http://www.rfc-editor.org/info/rfc20</a>&gt;.

   [<a id="ref-RFC2119">RFC2119</a>]  Bradner, S., &quot;Key words for use in RFCs to Indicate
              Requirement Levels&quot;, <a href="/doc/html/bcp14">BCP 14</a>, <a href="/doc/html/rfc2119">RFC 2119</a>, March 1997,
              &lt;<a href="https://www.rfc-editor.org/info/rfc2119">http://www.rfc-editor.org/info/rfc2119</a>&gt;.

   [<a id="ref-RFC3447">RFC3447</a>]  Jonsson, J. and B. Kaliski, &quot;Public-Key Cryptography
              Standards (PKCS) #1: RSA Cryptography Specifications
              Version 2.1&quot;, <a href="/doc/html/rfc3447">RFC 3447</a>, February 2003,
              &lt;<a href="https://www.rfc-editor.org/info/rfc3447">http://www.rfc-editor.org/info/rfc3447</a>&gt;.

   [<a id="ref-RFC3986">RFC3986</a>]  Berners-Lee, T., Fielding, R., and L. Masinter, &quot;Uniform
              Resource Identifier (URI): Generic Syntax&quot;, STD 66, <a href="/doc/html/rfc3986">RFC</a>
              <a href="/doc/html/rfc3986">3986</a>, January 2005,
              &lt;<a href="https://www.rfc-editor.org/info/rfc3986">http://www.rfc-editor.org/info/rfc3986</a>&gt;.

   [<a id="ref-RFC4648">RFC4648</a>]  Josefsson, S., &quot;The Base16, Base32, and Base64 Data
              Encodings&quot;, <a href="/doc/html/rfc4648">RFC 4648</a>, October 2006,
              &lt;<a href="https://www.rfc-editor.org/info/rfc4648">http://www.rfc-editor.org/info/rfc4648</a>&gt;.

   [<a id="ref-RFC5234">RFC5234</a>]  Crocker, D., Ed. and P. Overell, &quot;Augmented BNF for Syntax
              Specifications: ABNF&quot;, STD 68, <a href="/doc/html/rfc5234">RFC 5234</a>, January 2008,
              &lt;<a href="https://www.rfc-editor.org/info/rfc5234">http://www.rfc-editor.org/info/rfc5234</a>&gt;.





<span class="grey">Farrell, et al.               Experimental                     [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   [<a id="ref-RFC5246">RFC5246</a>]  Dierks, T. and E. Rescorla, &quot;The Transport Layer Security
              (TLS) Protocol Version 1.2&quot;, <a href="/doc/html/rfc5246">RFC 5246</a>, August 2008,
              &lt;<a href="https://www.rfc-editor.org/info/rfc5246">http://www.rfc-editor.org/info/rfc5246</a>&gt;.

   [<a id="ref-RFC5785">RFC5785</a>]  Nottingham, M. and E. Hammer-Lahav, &quot;Defining Well-Known
              Uniform Resource Identifiers (URIs)&quot;, <a href="/doc/html/rfc5785">RFC 5785</a>, April
              2010, &lt;<a href="https://www.rfc-editor.org/info/rfc5785">http://www.rfc-editor.org/info/rfc5785</a>&gt;.

   [<a id="ref-RFC6454">RFC6454</a>]  Barth, A., &quot;The Web Origin Concept&quot;, <a href="/doc/html/rfc6454">RFC 6454</a>, December
              2011, &lt;<a href="https://www.rfc-editor.org/info/rfc6454">http://www.rfc-editor.org/info/rfc6454</a>&gt;.

   [<a id="ref-RFC6698">RFC6698</a>]  Hoffman, P. and J. Schlyter, &quot;The DNS-Based Authentication
              of Named Entities (DANE) Transport Layer Security (TLS)
              Protocol: TLSA&quot;, <a href="/doc/html/rfc6698">RFC 6698</a>, August 2012,
              &lt;<a href="https://www.rfc-editor.org/info/rfc6698">http://www.rfc-editor.org/info/rfc6698</a>&gt;.

   [<a id="ref-RFC6750">RFC6750</a>]  Jones, M. and D. Hardt, &quot;The OAuth 2.0 Authorization
              Framework: Bearer Token Usage&quot;, <a href="/doc/html/rfc6750">RFC 6750</a>, October 2012,
              &lt;<a href="https://www.rfc-editor.org/info/rfc6750">http://www.rfc-editor.org/info/rfc6750</a>&gt;.

   [<a id="ref-RFC7231">RFC7231</a>]  Fielding, R., Ed. and J. Reschke, Ed., &quot;Hypertext Transfer
              Protocol (HTTP/1.1): Semantics and Content&quot;, <a href="/doc/html/rfc7231">RFC 7231</a>,
              June 2014, &lt;<a href="https://www.rfc-editor.org/info/rfc7231">http://www.rfc-editor.org/info/rfc7231</a>&gt;.

   [<a id="ref-RFC7235">RFC7235</a>]  Fielding, R., Ed. and J. Reschke, Ed., &quot;Hypertext Transfer
              Protocol (HTTP/1.1): Authentication&quot;, <a href="/doc/html/rfc7235">RFC 7235</a>, June 2014,
              &lt;<a href="https://www.rfc-editor.org/info/rfc7235">http://www.rfc-editor.org/info/rfc7235</a>&gt;.

   [<a id="ref-SHS">SHS</a>]      NIST, &quot;Secure Hash Standard (SHS)&quot;, FIPS PUB 180-4, March
              2012.

<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>.  Informative References</span>

   [<a id="ref-Bonneau">Bonneau</a>]  Bonneau, J., &quot;The Science of Guessing: Analyzing an
              Anonymized Corpus of 70 Million Passwords&quot;, IEEE Symposium
              on Security and Privacy 538-552, 2012.

   [<a id="ref-MI93">MI93</a>]     Mitchell, C. and A. Thomas, &quot;Standardising authentication
              protocols based on public key techniques&quot;, Journal of
              Computer Security Volume 2, 23-36, 1993.

   [<a id="ref-RFC4086">RFC4086</a>]  Eastlake 3rd, D., Schiller, J., and S. Crocker,
              &quot;Randomness Requirements for Security&quot;, <a href="/doc/html/bcp106">BCP 106</a>, <a href="/doc/html/rfc4086">RFC 4086</a>,
              June 2005, &lt;<a href="https://www.rfc-editor.org/info/rfc4086">http://www.rfc-editor.org/info/rfc4086</a>&gt;.

   [<a id="ref-RFC6265">RFC6265</a>]  Barth, A., &quot;HTTP State Management Mechanism&quot;, <a href="/doc/html/rfc6265">RFC 6265</a>,
              April 2011, &lt;<a href="https://www.rfc-editor.org/info/rfc6265">http://www.rfc-editor.org/info/rfc6265</a>&gt;.




<span class="grey">Farrell, et al.               Experimental                     [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


   [<a id="ref-RFC6376">RFC6376</a>]  Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed.,
              &quot;DomainKeys Identified Mail (DKIM) Signatures&quot;, STD 76,
              <a href="/doc/html/rfc6376">RFC 6376</a>, September 2011,
              &lt;<a href="https://www.rfc-editor.org/info/rfc6376">http://www.rfc-editor.org/info/rfc6376</a>&gt;.

   [<a id="ref-ThreatReport">ThreatReport</a>]
              Sophos, &quot;Security Threat Report 2013&quot;, January 2013,
              &lt;<a href="https://www.sophos.com/en-us/medialibrary/pdfs/other/sophossecuritythreatreport2013.pdf">http://www.sophos.com/en-us/medialibrary/pdfs/other/</a>
              <a href="https://www.sophos.com/en-us/medialibrary/pdfs/other/sophossecuritythreatreport2013.pdf">sophossecuritythreatreport2013.pdf</a>&gt;.










































<span class="grey">Farrell, et al.               Experimental                     [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>.  Problems with Passwords</span>

   By far, the most common mechanism for web authentication is passwords
   that can be remembered by the user, called &quot;human-memorable
   passwords&quot;.  There is plenty of good research on how users typically
   use human-memorable passwords (e.g., see [<a href="#ref-Bonneau" title="&quot;The Science of Guessing: Analyzing an Anonymized Corpus of 70 Million Passwords&quot;">Bonneau</a>]), but some of the
   highlights are that users typically try hard to reuse passwords on as
   many web sites as possible, and that web sites often use either email
   addresses or users&#x27; names as the identifiers that go with these
   passwords.

   If an attacker gets access to the database of memorizable passwords,
   that attacker can impersonate any of the users.  Even if the breach
   is discovered, the attacker can still impersonate users until every
   password is changed.  Even if all the passwords are changed or at
   least made unusable, the attacker now possesses a list of likely
   username/password pairs that might exist on other sites.

   Using memorizable passwords on unencrypted channels also poses risks
   to the users.  If a web site uses either the HTTP Basic
   authentication method, or an HTML form that does no cryptographic
   protection of the password in transit, a passive attacker can see the
   password and immediately impersonate the user.  If a hash-based
   authentication scheme such as HTTP Digest authentication is used, a
   passive attacker still has a high chance of being able to determine
   the password using a dictionary of known passwords.

   Note that passwords that are not human-memorable are still subject to
   database attack, though they are of course unlikely to be reused
   across many systems.  Similarly, database attacks of some form or
   other will work against any password-based authentication scheme,
   regardless of the cryptographic protocol used.  So for example, zero-
   knowledge or Password-Authenticated Key Exchange (PAKE) schemes,
   though making use of elegant cryptographic protocols, remain as
   vulnerable to what is clearly the most common exploit seen when it
   comes to passwords.  HOBA is, however, not vulnerable to database
   theft.














<span class="grey">Farrell, et al.               Experimental                     [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">Appendix B</a>.  Example</span>

   The following values show an example of HOBA-http authentication to
   the origin &quot;https://example.com:443&quot;.  Carriage returns have been
   added and need to be removed to validate the example.

   Public Key:

   -----BEGIN PUBLIC KEY-----
   MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAviE8fMrGIPZN9up94M28
   6o38B99fsz5cUqYHXXJlnHIi6gGKjqLgn3P7n4snUSQswLExrkhSr0TPhRDuPH_t
   fXLKLBbh17ofB7t7shnPKxmyZ69hCLbe7pB1HvaBzTxPC2KOqskDiDBOQ6-JLHQ8
   egXB14W-641RQt0CsC5nXzo92kPCdV4NZ45MW0ws3twCIUDCH0nibIG9SorrBbCl
   DPHQZS5Dk5pgS7P5hrAr634Zn4bzXhUnm7cON2x4rv83oqB3lRqjF4T9exEMyZBS
   L26m5KbK860uSOKywI0xp4ymnHMc6Led5qfEMnJC9PEI90tIMcgdHrmdHC_vpldG
   DQIDAQAB
   -----END PUBLIC KEY-----

   Origin: <a href="https://example.com:443">https://example.com:443</a>

   Key Identifier: vesscamS2Kze4FFOg3e2UyCJPhuQ6_3_gzN-k_L6t3w

   Challenge: pUE77w0LylHypHKhBqAiQHuGC751GiOVv4/7pSlo9jc=

   Signature algorithm: RSA-SHA256 (&quot;0&quot;)

   Nonce: Pm3yUW-sW5Q

   Signature:

   VD-0LGVBVEVjfq4xEd35FjnOrIqzJ2OQMx5w8E52dgVvxFD6R0ryEsHcD31ykh0i
   4YIzIHXirx7bE4x9yP-9fMBCEwnHJsYwYQhfRpmScwAz-Ih1Hn4yORTb-U66miUz
   q04ZgTHm4jAj45afU20wYpGXY2r3W-FRKc6J6Glv_zI_ROghERalxgXG-QVGZrKP
   tG0V593Yf9IPnFSpLyW6fnxscCMWUA9T-4NjMdypI-Ze4HsC9J06tRTOunQdofr9
   6ZJ2i9LE6uKSUDLCD2oeEeSEvUR--4OGtrgjzYysHZkdVSxAi7OoQBK34EUWg9kI
   S13qQA43m4IMExkbApqrSg

   Authorization Header:

   Authorization: HOBA result=&quot;vesscamS2Kze4FFOg3e2UyCJPhuQ6_3_gzN-
   k_L6t3w.pUE77w0LylHypHKhBqAiQHuGC751GiOVv4/7pSlo9jc=.Pm3yUW-sW5Q
   .VD-0LGVBVEVjfq4xEd35FjnOrIqzJ2OQMx5w8E52dgVvxFD6R0ryEsHcD31ykh0
   i4YIzIHXirx7bE4x9yP-9fMBCEwnHJsYwYQhfRpmScwAz-Ih1Hn4yORTb-U66miU
   zq04ZgTHm4jAj45afU20wYpGXY2r3W-FRKc6J6Glv_zI_ROghERalxgXG-QVGZrK
   PtG0V593Yf9IPnFSpLyW6fnxscCMWUA9T-4NjMdypI-Ze4HsC9J06tRTOunQdofr
   96ZJ2i9LE6uKSUDLCD2oeEeSEvUR--4OGtrgjzYysHZkdVSxAi7OoQBK34EUWg9k
   IS13qQA43m4IMExkbApqrSg&quot;




<span class="grey">Farrell, et al.               Experimental                     [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="/doc/html/rfc7486">RFC 7486</a>              HTTP Origin-Bound Auth (HOBA)           March 2015</span>


Acknowledgements

   Thanks to the following for good comments received during the
   preparation of this specification: Richard Barnes, David Black,
   Alissa Cooper, Donald Eastlake, Amos Jeffries, Benjamin Kaduk, Watson
   Ladd, Barry Leiba, Matt Lepinski, Ilari Liusvaara, James Manger,
   Alexey Melnikov, Kathleen Moriarty, Yoav Nir, Mark Nottingham, Julian
   Reschke, Pete Resnick, Michael Richardson, Yaron Sheffer, and Michael
   Sweet.  All errors and stupidities are of course the editors&#x27; fault.

Authors&#x27; Addresses

   Stephen Farrell
   Trinity College Dublin
   Dublin  2
   Ireland

   Phone: +353-1-896-2354
   EMail: stephen.farrell@cs.tcd.ie


   Paul Hoffman
   VPN Consortium

   EMail: paul.hoffman@vpnc.org


   Michael Thomas
   Phresheez

   EMail: mike@phresheez.com




















Farrell, et al.               Experimental                     [Page 28]
</pre></div>
    </div>

            
        </div>
        
    
    <script>
        var legend_html = 'Color legend:<br> \
        <table> \
        <tr><td>Unknown:</td>                   <td><span class="bgwhite">&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Draft:</td>                     <td><span class="bgred">&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Informational:</td>             <td><span class="bgorange">&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Experimental:</td>              <td><span class="bgyellow">&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Best Common Practice:</td>      <td><span class="bgmagenta">&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Proposed Standard:</td>         <td><span class="bgblue">&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Draft Standard (old designation):</td> <td><span class="bgcyan">&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Internet Standard:</td>         <td><span class="bggreen">&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Historic:</td>                  <td><span class="bggrey">&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Obsolete:</td>                  <td><span class="bgbrown">&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        </table>';
        function showLegend() {
            var elem = document.getElementById('legend');
            elem.innerHTML = legend_html
            elem.style.visibility='visible';
        }
        function hideLegend() {
            var elem = document.getElementById('legend');
            elem.style.visibility='hidden';
            elem.innerHTML = "";
        }
    </script>

</body>
</html>